package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.domain.JkFllowup;
import com.ruoyi.mapper.JkFllowupMapper;
import com.ruoyi.service.IJkFllowupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 随访管理Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-30
 */
@Service
public class JkFllowupServiceImpl extends ServiceImpl<JkFllowupMapper,JkFllowup> implements IJkFllowupService
{
    @Autowired
    private JkFllowupMapper jkFllowupMapper;

    /**
     * 查询随访管理
     *
     * @param id 随访管理主键
     * @return 随访管理
     */
    @Override
    public JkFllowup selectJkFllowupById(Long id)
    {
        return jkFllowupMapper.selectJkFllowupById(id);
    }

    /**
     * 查询随访管理列表
     *
     * @param jkFllowup 随访管理
     * @return 随访管理
     */
    @Override
    public List<JkFllowup> selectJkFllowupList(JkFllowup jkFllowup)
    {
        return jkFllowupMapper.selectJkFllowupList(jkFllowup);
    }

    /**
     * 新增随访管理
     *
     * @param jkFllowup 随访管理
     * @return 结果
     */
    @Override
    public int insertJkFllowup(JkFllowup jkFllowup)
    {
        jkFllowup.setCreateTime(DateUtils.getNowDate());
        return jkFllowupMapper.insertJkFllowup(jkFllowup);
    }

    /**
     * 修改随访管理
     *
     * @param jkFllowup 随访管理
     * @return 结果
     */
    @Override
    public int updateJkFllowup(JkFllowup jkFllowup)
    {
        return jkFllowupMapper.updateJkFllowup(jkFllowup);
    }

    /**
     * 批量删除随访管理
     *
     * @param ids 需要删除的随访管理主键
     * @return 结果
     */
    @Override
    public int deleteJkFllowupByIds(Long[] ids)
    {
        return jkFllowupMapper.deleteJkFllowupByIds(ids);
    }

    /**
     * 删除随访管理信息
     *
     * @param id 随访管理主键
     * @return 结果
     */
    @Override
    public int deleteJkFllowupById(Long id)
    {
        return jkFllowupMapper.deleteJkFllowupById(id);
    }

}
